package com.jiahao.material.services.Impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiahao.material.entity.User;
import com.jiahao.material.mapper.UserMapper;
import com.jiahao.material.services.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserById(String id) {
        return userMapper.getUserById(id);
    }

    @Override
    public User getUserByUName(String userName) {
        return userMapper.getUserByUName(userName);
    }

    @Override
    public IPage<User> getUsersByPage(Page<User> page, Map<String, Object> map) {
        return userMapper.getUsersByPage(page,map);
    }
}
